home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 97
/
097.d81
/
star mistresses
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
30KB
|
759 lines
10 rem ********************************
20 rem ** star-mistresses v2.1 **
30 rem ** by **
40 rem ** anthony rose **
50 rem ********************************
60 dv=peek(186):ifdv<8thendv=8
70 gosub3000:goto3040
80 rem --- random choices ---
90 fori=1to16:ch$(i)="":next
100 an=(rnd(1)*16+1):ch$(an)=an$(qt)
110 fori=1to16:ifch$(i)<>""then160
120 rn=rnd(1)*n%+1:ifan$(rn)=an$(qt)then120
130 fl=0:forj=1toi:ifch$(j)=an$(rn)thenfl=1:j=i
140 next:ifflthen120
150 ch$(i)=an$(rn)
160 next:return
170 rem --- game screen ---
180 print"[147]";:a$="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
190 fori=.to23:printa$:next:printa$""
200 print"[158] * * * * * star mistresses * * * * * "
210 fori=.to1:print"[150] ":next
220 fori=1to8:print:printb0$b0$:next
230 print"[153] question# [159] point value [154] score "
240 print"[153] 000 [159] 00000 [154] 00000 "
250 return
260 rem --- print question number ---
270 poke214,22:print
280 a$=str$(qn):a$=right$(a$,len(a$)-1)
290 printtab(8-len(a$))"[153]"a$
300 return
310 rem --- print point value ---
320 poke214,22:print:a$=str$(pv)
330 a$="000"+right$(a$,len(a$)-1)
340 printtab(17)"[159]"right$(a$,5)
350 return
360 rem --- print question ---
370 pokes+5,0:pokes+6,240:pokes+1,34:pokes,75:pokes+12,0
380 pokes+13,240:pokes+8,14:pokes+7,24
390 poke214,2:print:print"[150]";
400 a$=qt$(qt):fori=1tolen(a$)
410 ifmid$(a$,i,1)="+"thenprint:print"";:goto440
420 pokes+4,17:pokes+11,17:pokes+4,16:pokes+11,16
430 printmid$(a$,i,1);
440 next
450 print"?":return
460 rem --- print choices ---
470 poke214,5:print:fori=1to8
480 printmid$(c$,i,1)""ch$(i)tab(21)ch$(i+8)
490 print:next:return
500 rem --- print score ---
510 poke214,22:print
520 a$=str$(sc):a$=right$(a$,len(a$)-1)
530 printtab(35-len(a$))"[154]"a$
540 return
550 rem --- bonus prompt ---
560 poke214,9:print"[129]"
570 printtab(12)" "
580 printtab(12)" bonus if you "
590 printtab(12)" can answer the "
600 printtab(12)" next question! "
610 printtab(12)" "
620 fori=10to8step-1:r%=i:gosub980:next
630 fori=8to10:r%=i:gosub980:next
640 forde=1to3000:next
650 poke214,9:print
660 fori=.to2:printtab(12)" % ":printtab(12)"%%%%%%%%%%%%%%%%%"
670 next:return
680 rem --- clear screen lines ---
690 poke214,2:print
700 fori=.to1:print"[150] ":next
710 fori=1to8:print:printb0$b0$:next
720 return
730 rem -- highlight correct answer --
740 c%=1:r%=an:ifr%>8thenr%=r%-8:c%=2
750 fori=1to2:gosub900:gosub980
760 forde=1to100:next:gosub880
770 forde=1to100:next:next
780 gosub900:gosub980:return
790 rem --- clear screens ---
800 fori=0to12:poke781,i:sys59903:poke781,24-i:sys59903:next:return
810 rem --- clear title screen ---
820 poke214,10:print
830 fori=.to4:printtab(9)b0$:next
840 forde=1to1200:next:return
850 rem --- bottom to top ---
860 fori=24to.step-1:poke781,i:sys59903:next:return
870 rem --- highlight bar off ---
880 printtab(t)"[145]"b0$:printtab(t)"[145]"ch$(a):return
890 rem --- highlight bar on ---
900 poke214,r%*2+3:print
910 t=(c%-1)*19:a=(c%-1)*8+r%
920 printtab(t)mid$(c$,r%,1)b1$
930 printtab(t)"[145]"ch$(a)
940 return
950 rem --- clear sid chip ---
960 fori=.to24:pokes+i,.:next:pokes+24,15:return
970 rem --- beep ---
980 pokes+6,200:pokes+1,r%*5+10
990 pokes+4,17:forde=1to50:next
1000 pokes+4,16:return
1010 rem --- rasberry ---
1020 pokes+5,0:pokes+6,240
1030 fori=1024to768step-8
1040 pokes+1,i/256:pokes,iand255
1050 pokes+4,33:next:pokes+4,32
1060 return
1070 rem --- correct sound ---
1080 pokes+6,225:pokes+4,17
1090 fori=1to7:forde=1to180step20
1100 pokes+1,de:next:next
1110 pokes+4,0:return
1120 rem --- meet the champ ---
1130 pokes+5,41:pokes+6,48
1140 fori=0to16:pokes+4,17
1150 forj=1tod(i)*2:f=f(i)+peek(s+27)/2
1160 pokes+0,fand255:pokes+1,int(f/256)
1170 next:pokes+4,16:next
1180 return
1190 rem --- new high score ---
1200 fori=1to3:forj=1to3
1210 pokes+5,62:pokes+6,48
1220 pokes+1,j*3+6:pokes,54
1230 pokes+4,33:forde=1to108:next
1240 pokes+4,32::forde=1to10:next
1250 next:next:return
1260 rem --- bonus 1000 ---
1270 pokes+6,240:pokes+4,17
1280 fori=1to14:forde=1to185step10
1290 pokes+1,de:next:poke53280,20-i:next
1300 pokes+4,0:return
1310 rem --- cursor ---
1320 f=(fand7)+1:printmid$(cr$,f,1)"[157]";
1330 forde=1to30:next:return
1340 rem --- check drive ---
1350 open15,dv,15,"r0:"+f$+"="+f$:input#15,er:close15
1360 return
1370 rem --- main ---
1380 ifbn=2thengosub560
1390 gosub270:gosub320:gosub90:gosub370
1400 gosub470:r%=1:c%=1:gosub900
1410 geta$:ifa$<>""then1410
1420 j=peek(jy)and15:geta$
1425 ifa$="q"thenqt=qt+21-qn:goto2330
1430 if(peek(jy)and16)=.ora$=chr$(13)then1510
1440 ifj=14ora$="[145]"thengosub880:r%=r%-1-(r%=1)*8:goto1490
1450 ifj=13ora$=""thengosub880:r%=r%+1+(r%=8)*8:goto1490
1460 ifj=11ora$="[157]"thengosub880:c%=c%-1-(c%=1)*2:goto1490
1470 ifj=7ora$=""thengosub880:c%=c%+1+(c%=2)*2:goto1490
1480 goto1420
1490 gosub900:gosub980:goto1420
1500 rem --- check answer ---
1510 ifch$(a)<>an$(qt)thenpv=50:bn=0:gosub1020:gosub880:gosub740:goto1530
1520 gosub1080:sc=sc+pv:gosub510:pv=pv+50:bn=bn+1:ifbn=3thenbn=0:goto1570
1530 forde=1to2500:next:gosub690
1540 qt=qt+1:qn=qn+1:ifqn>20then2110
1550 goto1380
1560 rem --- bonus rock ---
1570 forde=1to2000:next:gosub860
1580 poke53265,peek(53265)or64
1590 poke53280,6:poke53281,10:poke53282,3:poke53283,8:poke53284,7
1600 pokes+24,15:pokes+1,30:pokes+6,200
1610 c%=1:r%=rnd(1)*20+1
1620 print"[147][144][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][194][207][206][213][211][160][210][207][204][204][160][160][160][160][160][160][160][160][160][160][160][160][160][160][157][148][160]"
1630 print"[156][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][157][148][165]"
1640 print"[165][165] [144]& 100 [146][156][165][157][148][165]"
1650 print"[165][165] [144]& 150 [156][165][157][148][165]"
1660 print"[165][165] [144]& 200 [146][156][165][157][148][165]"
1670 print"[165][165] [144]& 250 [156][165][157][148][165]"
1680 print"[165][165] [144]& 300 [146][156][165][157][148][165]"
1690 print"[165][165] [144]& 350 [156][165][157][148][165]"
1700 print"[165][165] [144]& 400 [146][156][165][157][148][165]"
1710 print"[165][165] [144]& 450 [156][165][157][148][165]"
1720 print"[165][165] [144]& 500 [146][156][165][157][148][165]"
1730 print"[165][165] [144]& 750 [156][165][157][148][165]"
1740 print"[165][165] [144]& 1000 [146][156][165][157][148][165]"
1750 print"[165][165] [144]& 750 [156][165][157][148][165]"
1760 print"[165][165] [144]& 500 [146][156][165][157][148][165]"
1770 print"[165][165] [144]& 450 [156][165][157][148][165]"
1780 print"[165][165] [144]& 400 [146][156][165][157][148][165]"
1790 print"[165][165] [144]& 350 [156][165][157][148][165]"
1800 print"[165][165] [144]& 300 [146][156][165][157][148][165]"
1810 print"[165][165] [144]& 250 [156][165][157][148][165]"
1820 print"[165][165] [144]& 200 [146][156][165][157][148][165]"
1830 print"[165][165] [144]& 150 [156][165][157][148][165]"
1840 print"[165][165] [144]& 100 [146][156][165][157][148][165]"
1850 print"[165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][157][148][165]"
1860 print"[144][160][160][160][